package com.lw.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * @author Administrator
 * @version 1.0
 * @description:
 * @date 2022/3/8 10:58
 */

@Controller
public class TestController {
    @RequestMapping("/test1")
    public String test1(String name, HttpServletRequest request, HttpSession session){
        request.setAttribute("diyige",name);
        session.setAttribute("age",19);
        session.setAttribute("gender","男");
        return "forward:/aaa.jsp";
    }
}
